import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const routes = [
    { path: "/", redirect: '/home' },
    { path: '/home', component: () => import("@/views/Home/Home.vue") },
    { path: '/about', component: () => import("@/views/About/About.vue") },
];

const router = new Router({
    mode: 'history', // 使用HTML5 History模式，需要后端正确配置s
    routes // （缩写）相当于 routes: routes
});

export default router;